<%@ page language="java"
    import="java.util.ArrayList,
             java.util.Iterator,
             com.scalar.chiptrack.operations.process.StepProperty,
             com.scalar.chiptrack.operations.process.ProcessTrack,
             com.scalar.chiptrack.utils.ConfigManager"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%
    response.setHeader("Cache-Control", "no-cache");
    response.setHeader("Pragma", "no-cache");
    response.setDateHeader("max-age", 0);
    response.setDateHeader("Expires", 0);
%>
<!--chiptrack:checkLogon sourcePage="/jsp/operations/process_view.jsp"/-->
<chiptrack:checkLogon sourcePage="/baseProductList.do"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href='<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css' type='text/css' rel='stylesheet'>
</HEAD>
<BODY bgColor='#ffffff' leftMargin='0' topMargin='0' marginheight='0' marginwidth='0'>
<!-- Top Header Start-->
<%@include file="/jsp/includes/header.jsp"  %>
<!-- Top Header End-->

<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
	<TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>

    <!-- Side Navigation start -->
    <%@include file="/jsp/operations/operations_menu.jsp" %>
    </TD>
    <!-- end of the side navigations -->

    <TD bgcolor="#ffffff">
    <IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
    <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
    <TD valign="middle" width="95%" align="center">

    <IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
    <BR>
    <!-- from here your body starts -->

    <%
		ProcessTrack[] list = (ProcessTrack[])request.getAttribute("process");
		//String productId = (String)session.getAttribute("productId");
		String productId = (String)request.getAttribute("baseProductID");
		request.setAttribute("productID", productId);
		//System.out.println("Baseproduct ID in JSP = "+ productId);
		int length = list.length;
		StepProperty[] assemblyList = null;

		for(int i=0; i<length; i++){
			int temp = 1;
			StepProperty fab = list[i].getFab();
    %>
    <table cellspacing='0' cellpadding='0' border='0' bordercolor='#3333cc'>
    <% if(i==0){ %>
	<tr><td align="center" colSpan = 20 class="NArialW"><% out.print(request.getAttribute("baseProductName"));%> Product Setup </td></tr>
	<tr><td> &nbsp;&nbsp;&nbsp; </td></tr><tr><td> &nbsp;&nbsp;&nbsp; </td></tr>
    <% } %>
	<tr>
    <%
	    String status = fab.getStatus();
		if(status != null){
			if(status.trim().equalsIgnoreCase("Incomplete")){
			//request.setAttribute("fabName", fab.getProductName());
            %>
            <td align="center" class="previous" ><a href="<%=chipTracContext%>/fabAction.do?fabName=<%= fab.getProductName()%>&trackID=<%= fab.getTrackID()%>&productID=<%= productId%>">
            <%= fab.getProcessType()%></a></td>
            <%
	        }else{
		        //request.setAttribute("fabStepID", fab.getProcessStepID());
            %>
                <td align="center" class="current" ><a href="<%=chipTracContext%>/fabAction.do?processStepID=<%= fab.getProcessStepID()%>">
                <%= fab.getProcessType()%></a></td>
            <%
	        }
        }else{
    	//request.setAttribute("fabName", fab.getProductName());
       %>
            <td align="center" class="fresh"><a href="<%=chipTracContext%>/fabAction.do?fabName=<%= fab.getProductName()%>&trackID=<%= fab.getTrackID()%>&productID=<%= productId%>">
            <%= fab.getProcessType()%></a></td>
        <%
		}

		StepProperty waferStore = list[i].getWaferStore();
		StepProperty dieBank = list[i].getDieBank();

		if(waferStore != null){

			temp++;
			String waferStatus = waferStore.getStatus();

			if((waferStatus != null) && ( !waferStatus.trim().equalsIgnoreCase("Incomplete") ) && ( !waferStatus.trim().equalsIgnoreCase("InProcess") ) ){
			    //request.setAttribute(waferStore.getProcessType(), waferStore.getProcessStepID());
            %>
                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                <td align="center" class="current"><a href="<%=chipTracContext%>/waferStore.do?processStepID=<%= waferStore.getProcessStepID()%>&trackID=<%= waferStore.getTrackID()%>">
                <%= waferStore.getProcessType()%><a></td>
            <%
            }else{

                if((waferStatus != null) && ( waferStatus.trim().equalsIgnoreCase("InProcess") ) ){
                 %>
                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                    <td align="center" class="inprocess"><a href="<%=chipTracContext%>/waferStore.do?processStepID=<%= waferStore.getProcessStepID()%>&trackID=<%= waferStore.getTrackID()%>">
                    <%= waferStore.getProcessType()%><a></td>
                <%
                } else {
                   if( ( waferStore.getPreviousStepID() != null )
                         && ( !waferStore.getPreviousStepID().trim().equals("0") )
                         && ( waferStore.getPreviousStepStatus() != null )
                         && ( !waferStore.getPreviousStepStatus().trim().equals("Inprocess") )   ){
                           //request.setAttribute("fabName", fab.getProductName());
                          //request.setAttribute("waferStorePreviousStepID", waferStore.getPreviousStepID());
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="previous" ><a href="<%=chipTracContext%>/waferStore.do?productName=<%= fab.getProductName()%>&previousStepID=<%= waferStore.getPreviousStepID()%>&trackID=<%= waferStore.getTrackID()%>&baseProductID=<%= productId %>&processStepID=-1&stepName=<%= waferStore.getProcessType()%>">
                            <%= waferStore.getProcessType()%></a></td>
                        <%
                        } else {
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td  align="center" class="fresh"><%= waferStore.getProcessType()%></td>
                        <%
                        }
                    }
				}
			}

			ArrayList sortList = list[i].getSort();
			Iterator sort = sortList.iterator();
			temp += sortList.size();

			while (sort.hasNext()){

				StepProperty step = (StepProperty)sort.next();
				String sortStatus = step.getStatus();

				if(( sortStatus != null ) && ( !sortStatus.trim().equalsIgnoreCase("Incomplete")) && ( !sortStatus.trim().equalsIgnoreCase("Inprocess")) ){
					//request.setAttribute(step.getProcessType(), step.getProcessStepID());
                %>
                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                <td align="center" class="current" >
                <a href="<%=chipTracContext%>/sortProcess.do?action=EditSortProcess&processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>">
                <%= step.getProcessType() %> </a> </td>
                <%
                }else{
                    if((sortStatus != null) && ( sortStatus.trim().equalsIgnoreCase("InProcess") ) ){
                    %>
                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                        <td align="center" class="inprocess" >
                        <a href="<%=chipTracContext%>/sortProcess.do?action=EditSortProcess&processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>">
                        <%= step.getProcessType() %> </a> </td>
                    <%
                    } else {
                        if((step.getPreviousStepID() != null)
                                &&(!step.getPreviousStepID().trim().equals("0"))
                                && ( step.getPreviousStepStatus() != null )
                                && ( !step.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") )   ) {
                            //request.setAttribute("trackID", step.getTrackID()+"");
                            //request.setAttribute(step.getProcessType()+"previousStepID", step.getPreviousStepID());
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="previous">
                            <a href="<%=chipTracContext%>/sortProcess.do?action=CreateProcess&fabProductName=<%= fab.getProductName()%>&stepName=<%= step.getProcessType()%>&trackID=<%= step.getTrackID()%>&previousStepID=<%= step.getPreviousStepID()%>&productID=<%= productId%>">
                            <%= step.getProcessType() %></a></td>
                        <%
                        }else{
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="fresh"><%= step.getProcessType() %></td>
                        <%
                        }
                    }
				}
			}

			if(dieBank != null){

				temp++;
				String dieStatus = dieBank.getStatus();

				if((dieStatus != null) && ( !dieStatus.trim().equalsIgnoreCase("Incomplete") ) && ( !dieStatus.trim().equalsIgnoreCase("Inprocess")) ){
					//request.setAttribute(dieBank.getProcessType(), dieBank.getProcessStepID());
                %>
                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                    <td align="center" class="current"><a href="<%=chipTracContext%>/dieBank.do?processStepID=<%= dieBank.getProcessStepID()%>&trackID=<%= dieBank.getTrackID()%>">
                    <%= dieBank.getProcessType()%><a></td>
                <%
				}else{
                    if((dieStatus != null) && ( dieStatus.trim().equalsIgnoreCase("Inprocess")) ){
                    %>
                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                        <td align="center" class="inprocess"><a href="<%=chipTracContext%>/dieBank.do?processStepID=<%= dieBank.getProcessStepID()%>&trackID=<%= dieBank.getTrackID()%>">
                        <%= dieBank.getProcessType()%><a></td>
                    <%
                    }else{
                        if((dieBank.getPreviousStepID() != null)
                                &&( !dieBank.getPreviousStepID().trim().equals("0") )
                                && ( dieBank.getPreviousStepStatus() != null )
                                && ( !dieBank.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) ) {
                            //request.setAttribute("trackID", dieBank.getTrackID()+"");
                            //request.setAttribute(dieBank.getProcessType()+"previousStepID", dieBank.getPreviousStepID());
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="previous" ><a href="<%=chipTracContext%>/dieBank.do?productName=<%= fab.getProductName()%>&previousStepID=<%= dieBank.getPreviousStepID()%>&trackID=<%= dieBank.getTrackID()%>&baseProductID=<%= productId %>&processStepID=-1&stepName=<%= dieBank.getProcessType()%>">
                            <%= dieBank.getProcessType()%></a></td>
                        <%
                        }else{
                            %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh"><%= dieBank.getProcessType()%></td>
                            <%
                        }
                    }
				}
			}
            %>

            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh">ASSEMBLY</td>
            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh">TEST</td>
            <% boolean flagClassStore = false;	if(list[i].getClassStore().size() > 0) {
                flagClassStore = true;
            %>
            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh">Class Store</td>
        <% } %>
        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh">Mark & Pack</td>
        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh">FG</td>
        </tr>

        <tr>
        <%
        for(int x=0; x<(2*(temp+5)-1); x++){
        %>
            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
        <%
	    }
        %>
        </tr>

        <%
        assemblyList = list[i].getAssemblyList();
        for(int j=0; j<assemblyList.length; j++)
        {
            ArrayList test_list = (ArrayList)(list[i].getTest().get(assemblyList[j].getProductName()));
            ArrayList[] fgList = (ArrayList[])(list[i].getMarkAndFG().get(assemblyList[j].getProductName()));

            StepProperty classStore = null;
            if(list[i].getClassStore() !=  null)
            {
                classStore = (StepProperty)(list[i].getClassStore().get(assemblyList[j].getProductName()));
            }
            %>
            <tr>
            <%
            for(int x=0; x<(2*temp -1 ); x++)
            {
                %>
                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                <%
            }

            String asyStatus = assemblyList[j].getStatus();
            if( ( asyStatus != null ) && (!asyStatus.trim().equalsIgnoreCase("Incomplete")) && ( !asyStatus.trim().equalsIgnoreCase("Inprocess") ) )
            {
                    //request.setAttribute(assemblyList[j].getProcessType(), assemblyList[j].getProcessStepID());
            %>
                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                <td align="center"  class="current" ><a href="<%=chipTracContext%>/assembly.do?processStepID=<%= assemblyList[j].getProcessStepID()%>&trackID=<%= assemblyList[j].getTrackID()%>">
                <%= assemblyList[j].getProductName()%></a></td>
            <%
            } else {

                    if((asyStatus != null)&& ( asyStatus.trim().equalsIgnoreCase("Inprocess")) )
                    {
                    %>
                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                        <td align="center"  class="inprocess" ><a href="<%=chipTracContext%>/assembly.do?processStepID=<%= assemblyList[j].getProcessStepID()%>&trackID=<%= assemblyList[j].getTrackID()%>">
                        <%= assemblyList[j].getProductName()%></a></td>
                    <%
                    } else {

                        if((assemblyList[j].getPreviousStepID().trim() != null)
                                && (!assemblyList[j].getPreviousStepID().trim().equals("0") )
                                && ( assemblyList[j].getPreviousStepStatus() != null )
                                && ( !assemblyList[j].getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) )
                        {
                                //request.setAttribute("trackID", assemblyList[j].getTrackID()+"");
                                //request.setAttribute(assemblyList[j].getProcessType()+"previousStepID", assemblyList[j].getPreviousStepID());
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center"  class="previous"><a href="<%=chipTracContext%>/assembly.do?trackID=<%= assemblyList[j].getTrackID()%>&previousStepID=<%= assemblyList[j].getPreviousStepID()%>&productName=<%= assemblyList[j].getProductName()%>&stepName=<%= assemblyList[j].getProcessType()%>&processStepID=-1&baseProductID=<%= productId%>">
                            <%= assemblyList[j].getProductName()%></a></td>
                        <%
                        } else {
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh"><%= assemblyList[j].getProductName()%></td>
                        <%
                        }
                    }
            }

            Iterator it = test_list.iterator();
            int cellCount = 3;
            if(test_list.isEmpty())
            {
                for(int x=0; x<2*cellCount; x++)
                {
                %>
                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                <%
                }
                %>
                </tr>
                <tr>
            <%
            }

            boolean first = true;
            int count =0;
            int testCount = test_list.size();
            int fgListCount = 0;

            if(fgList != null)
            {
                fgListCount = fgList.length;
            }

            while(it.hasNext())
            {
               StepProperty step = (StepProperty)it.next();
               if(first)
               {
                    String testStatus = step.getStatus();

                    if((testStatus != null) && (!testStatus.trim().equalsIgnoreCase("Incomplete")) && ( !testStatus.trim().equalsIgnoreCase("Inprocess") ) )
                    {
                        //request.setAttribute(step.getProcessType(), step.getProcessStepID());
                        if(step.getBinSetup())
                        {
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="current"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>&binSetup=true">
                            <%= step.getProcessType()%></a></td>
                         <% } else { %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="current"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>">
                            <%= step.getProcessType()%></a></td>
                            <%
                        }
                    } else	{
                       if( (testStatus != null) &&  ( testStatus.trim().equalsIgnoreCase("Inprocess") ) ) {
                            if(step.getBinSetup())
                            {
                            %>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td align="center" class="inprocess"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>&binSetup=true">
                                <%= step.getProcessType()%></a></td>
                            <% } else { %>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td align="center" class="inprocess"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>">
                                <%= step.getProcessType()%></a></td>
                             <%
                            }
                       } else {
                           if( ( step.getPreviousStepID() != null )
                                && ( !step.getPreviousStepID().trim().equals("0") )
                                && ( step.getPreviousStepStatus() != null  )
                                && ( !step.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") )  )
                            {
                            //request.setAttribute("trackID", step.getTrackID()+"");
                            //request.setAttribute(step.getProcessType()+"previousStepID", step.getPreviousStepID());
                                if(step.getBinSetup())
                                {
                                %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td align="center" class="previous"><a href="<%=chipTracContext%>/test.do?stepName=<%= step.getProcessType()%>&trackID=<%=step.getTrackID() %>&previousStepID=<%= step.getPreviousStepID()%>&processStepID=-1&productName=<%= step.getProductName()%>&baseProductID=<%= productId %>&binSetup=true">
                                    <%= step.getProcessType()%></a></td>
                                <%
                                  }else{
                                %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td align="center" class="previous"><a href="<%=chipTracContext%>/test.do?stepName=<%= step.getProcessType()%>&trackID=<%=step.getTrackID() %>&previousStepID=<%= step.getPreviousStepID()%>&processStepID=-1&productName=<%= step.getProductName()%>&baseProductID=<%= productId %>">
                                    <%= step.getProcessType()%></a></td>
                                <%}%>
                            <%
                            } else {
                                %>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh"><%= step.getProcessType()%></td>
                                <%
                            }
                       }
					}

					if(classStore != null)
					{
						String classStoreStatus = classStore.getStatus();
						if((classStoreStatus != null) && (!classStoreStatus.trim().equalsIgnoreCase("Incomplete")) && (!classStoreStatus.trim().equalsIgnoreCase("Inprocess")) )
						{
						//request.setAttribute(step.getProcessType(), step.getProcessStepID());
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="current"><a href="<%=chipTracContext%>/classStore.do?processStepID=<%= classStore.getProcessStepID()%>&trackID=<%= classStore.getTrackID()%>">
                            <%= classStore.getProcessType()%></a></td>
                        <%
						}
						else
						{
                            if( (classStoreStatus != null) && ( classStoreStatus.trim().equalsIgnoreCase("Inprocess") ) ){
                            %>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td align="center" class="inprocess"><a href="<%=chipTracContext%>/classStore.do?processStepID=<%= classStore.getProcessStepID()%>&trackID=<%= classStore.getTrackID()%>">
                                <%= classStore.getProcessType()%></a></td>
                            <%
                            } else {
                                if( ( classStore.getPreviousStepID() != null)
                                        && ( !classStore.getPreviousStepID().trim().equals("0"))
                                        && ( classStore.getPreviousStepStatus() != null )
                                        && ( !classStore.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) )
                                {
                                    //request.setAttribute("trackID", step.getTrackID()+"");
                                    //request.setAttribute(step.getProcessType()+"previousStepID", step.getPreviousStepID());
                                 %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td align="center" class="previous"><a href="<%=chipTracContext%>/classStore.do?stepName=<%= classStore.getProcessType()%>&trackID=<%=classStore.getTrackID() %>&previousStepID=<%= classStore.getPreviousStepID()%>&processStepID=-1&productName=<%= classStore.getProductName()%>&baseProductID=<%= productId %>">
                                    <%= classStore.getProcessType()%></a></td>
                                 <%
                                } else {
                                %>
                                     <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh"><%= classStore.getProcessType()%></td>
                                <%
                                }
                            }
						}
					}
					if(fgList != null)
					{
						if(count<fgList.length)
						{
							if(!fgList[count].isEmpty())
							{
								Iterator m = fgList[count].iterator();
								while(m.hasNext())
								{
									StepProperty mark = (StepProperty)m.next();
									String markStatus = mark.getStatus();
									if((markStatus != null) && (!markStatus.trim().equalsIgnoreCase("Incomplete")) && (!markStatus.trim().equalsIgnoreCase("Inprocess")) )
									{
                                        //System.out.println(classStore == null);	System.out.println(flagClassStore);
                                        //request.setAttribute(mark.getProcessType(), mark.getProcessStepID());
                                        if(flagClassStore && classStore == null)
										{
                                         %>
                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                        <%
										}
                                        %>
                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                        <td align="center" class="current"><a href="<%=chipTracContext%>/markAndPack.do?processStepID=<%= mark.getProcessStepID()%>&trackID=<%= mark.getTrackID()%>&previousStepName=<%= mark.getPreviousStepName()%>">
                                        <%= mark.getProductName()%></a></td>
                                    <%
                                    } else {
                                           if( (markStatus != null) && ( markStatus.trim().equalsIgnoreCase("Inprocess")) )
                                           {
                                                if(flagClassStore && classStore == null)
										        {
                                                %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <%
										        }
                                                %>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td align="center" class="inprocess"><a href="<%=chipTracContext%>/markAndPack.do?processStepID=<%= mark.getProcessStepID()%>&trackID=<%= mark.getTrackID()%>&previousStepName=<%= mark.getPreviousStepName()%>">
                                                <%= mark.getProductName()%></a></td>
                                                <%
                                           }else {
                                                if((mark.getPreviousStepID() != null)
                                                        && ( !mark.getPreviousStepID().trim().equals("0") )
                                                        && ( mark.getPreviousStepStatus() != null)
                                                        && ( !mark.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) )
                                                {
                                                    //request.setAttribute("trackID", mark.getTrackID()+"");
                                                    //request.setAttribute(mark.getProcessType()+"previousStepID", mark.getPreviousStepID());
                                                    if(flagClassStore && classStore == null)
                                                    {
                                                    %>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <%
                                                    }
                                                    %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="previous"><a href="<%=chipTracContext%>/markAndPack.do?stepName=<%= mark.getProcessType()%>&trackID=<%=mark.getTrackID() %>&previousStepID=<%= mark.getPreviousStepID()%>&processStepID=-1&productName=<%= mark.getProductName()%>&baseProductID=<%= productId %>&previousStepName=<%= mark.getPreviousStepName()%>">
                                                    <%= mark.getProductName()%></a></td>
                                                    <%
                                                } else {
                                                    if(flagClassStore && classStore == null)
                                                    {
                                                    %>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <%
                                                    }
                                                    %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="fresh"><%= mark.getProcessType()%></td>
                                                    <%
                                                }
                                           }
									    }

                                        StepProperty fg = (StepProperty)m.next();
                                        String fgStatus = fg.getStatus();
                                        if((fgStatus != null) && ( !fgStatus.trim().equalsIgnoreCase("Incomplete")) && ( !fgStatus.trim().equalsIgnoreCase("Inprocess")) )
                                        {
                                            //request.setAttribute(fgStep.getProcessType(), fgStep.getProcessStepID());
                                        %>
                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                            <td align="center" class="current"><a href="<%=chipTracContext%>/finishedGoods.do?processStepID=<%= fg.getProcessStepID()%>&trackID=<%= fg.getTrackID()%>&previousStepName=<%= fg.getPreviousStepName()%>">
                                            <%= fg.getProductName()%></a></td>
                                        <%
                                        } else {
                                            if( (fgStatus != null)  && ( fgStatus.trim().equalsIgnoreCase("Inprocess")) ){
                                            %>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td align="center" class="inprocess"><a href="<%=chipTracContext%>/finishedGoods.do?processStepID=<%= fg.getProcessStepID()%>&trackID=<%= fg.getTrackID()%>&previousStepName=<%= fg.getPreviousStepName()%>">
                                                <%= fg.getProductName()%></a></td>
                                            <%
                                            }else{

                                                if( ( fg.getPreviousStepID() != null )
                                                        && ( !fg.getPreviousStepID().trim().equals("0"))
                                                        && ( fg.getPreviousStepStatus() != null)
                                                        && ( !fg.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess")))
                                                {
                                                    //request.setAttribute("trackID", fg.getTrackID()+"");
                                                    //request.setAttribute(fg.getProcessType()+"previousStepID", fg.getPreviousStepID());
                                                 %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="previous"><a href="<%=chipTracContext%>/finishedGoods.do?stepName=<%= fg.getProcessType()%>&trackID=<%=fg.getTrackID() %>&previousStepID=<%= fg.getPreviousStepID()%>&processStepID=-1&productName=<%= fg.getProductName()%>&baseProductID=<%= productId %>&previousStepName=<%= fg.getPreviousStepName()%>">
                                                    <%= fg.getProductName()%></a></td>
                                                    <%
                                                }
                                                else
                                                {
                                                %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh"><%= fg.getProcessType()%></td>
                                                <%
                                                }

                                            }
                                        }

								    } //while

							    } else {

                                %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <%
                               } //fgList empty check
                                    count++;
                          } else  { //count if
                              if(count <testCount)
                              {
                              %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                               <%
                               }
                         }
                    } //fgList if

		       } else {
                    %>
                    <!-- <tr> -->
                    <%
                    for(int x=0; x<(2*(temp+1)-1); x++)
                    {
                        %>
                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                        <%
                    }

                    String testStatus = step.getStatus();

                    if((testStatus != null) && ( !testStatus.trim().equalsIgnoreCase("Incomplete") ) && ( !testStatus.trim().equalsIgnoreCase("Inprocess") ) )
                    {
                        //request.setAttribute(step.getProcessType(), step.getProcessStepID());
                        if(step.getBinSetup())
                        {
                        %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="current"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>&binSetup=true">
                            <%= step.getProcessType()%></a></td>
                        <% } else { %>
                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                            <td align="center" class="current"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>">
                            <%= step.getProcessType()%></a></td>
                            <%
                            }

                        } else {
                            if((testStatus != null)  && ( testStatus.trim().equalsIgnoreCase("Inprocess") ) )
                            {
                                if(step.getBinSetup())
                                {
                                %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td align="center" class="inprocess"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>&binSetup=true">
                                    <%= step.getProcessType()%></a></td>
                                <% } else { %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td align="center" class="inprocess"><a href="<%=chipTracContext%>/test.do?processStepID=<%= step.getProcessStepID()%>&trackID=<%= step.getTrackID()%>">
                                    <%= step.getProcessType()%></a></td>
                                <% }
                            } else {
                                 if((step.getPreviousStepID() != null)
                                         && ( !step.getPreviousStepID().trim().equals("0") )
                                         && (step.getPreviousStepStatus() != null)
                                         && ( !step.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) )
                                 {
                                    //request.setAttribute("trackID", step.getTrackID()+"");
                                    //request.setAttribute(step.getProcessType()+"previousStepID", step.getPreviousStepID());
                                   if(step.getBinSetup())
                                    {
                                    %>
                                           <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                           <td align="center" class="previous"><a href="<%=chipTracContext%>/test.do?stepName=<%= step.getProcessType()%>&trackID=<%=step.getTrackID() %>&previousStepID=<%= step.getPreviousStepID()%>&processStepID=-1&productName=<%= step.getProductName()%>&baseProductID=<%= productId%>&binSetup=true">
                                           <%= step.getProcessType()%></a></td>
                                    <% } else { %>
                                           <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                           <td align="center" class="previous"><a href="<%=chipTracContext%>/test.do?stepName=<%= step.getProcessType()%>&trackID=<%=step.getTrackID() %>&previousStepID=<%= step.getPreviousStepID()%>&processStepID=-1&productName=<%= step.getProductName()%>&baseProductID=<%= productId%>">
                                           <%= step.getProcessType()%></a></td>
                                  <% }
                                  } else {
                                  %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh"><%= step.getProcessType()%></td>
                                  <%
                                  }
                            }
                         }
                         if(fgList != null)
                         {
                             if(count<fgList.length)
                             {
                                if(!fgList[count].isEmpty())
                                {
                                    Iterator m = fgList[count].iterator();
                                    while(m.hasNext())
                                    {
                                        StepProperty mark = (StepProperty)m.next();
                                        String markStatus = mark.getStatus();
                                        if((markStatus != null) && ( !markStatus.trim().equalsIgnoreCase("Incomplete") ) && ( !markStatus.trim().equalsIgnoreCase("Inprocess") ) )
                                        {
                                             //request.setAttribute(mark.getProcessType(), mark.getProcessStepID());
                                             //System.out.println("flag  "+flagClassStore);
                                             if(flagClassStore){
                                             %>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <%}%>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td align="center" class="current"><a href="<%=chipTracContext%>/markAndPack.do?processStepID=<%= mark.getProcessStepID()%>&trackID=<%= mark.getTrackID()%>&previousStepName=<%= mark.getPreviousStepName()%>">
                                                <%= mark.getProductName()%></a></td>
                                            <%
                                            } else {
                                                 if((markStatus != null) && ( markStatus.trim().equalsIgnoreCase("Inprocess") ) ){
                                                    if(flagClassStore){
                                                    %>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <%}%>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="inprocess"><a href="<%=chipTracContext%>/markAndPack.do?processStepID=<%= mark.getProcessStepID()%>&trackID=<%= mark.getTrackID()%>&previousStepName=<%= mark.getPreviousStepName()%>">
                                                    <%= mark.getProductName()%></a></td>
                                                    <%
                                                 } else {
                                                     if( ( mark.getPreviousStepID() != null)
                                                             && ( !mark.getPreviousStepID().trim().equals("0"))
                                                             && ( mark.getPreviousStepStatus() != null)
                                                             && ( !mark.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) )
                                                     {
                                                        //request.setAttribute("trackID", mark.getTrackID()+"");
                                                        //request.setAttribute(mark.getProcessType()+"previousStepID", mark.getPreviousStepID());
                                                        if(flagClassStore)
                                                        {
                                                        %>
                                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <% } %>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <td align="center" class="previous"><a href="<%=chipTracContext%>/markAndPack.do?stepName=<%= mark.getProcessType()%>&trackID=<%=mark.getTrackID() %>&previousStepID=<%= mark.getPreviousStepID()%>&processStepID=-1&productName=<%= mark.getProductName()%>&baseProductID=<%= productId %>&previousStepName=<%= mark.getPreviousStepName()%>">
                                                        <%= mark.getProductName()%></a></td>
                                                        <%
                                                        }else{
                                                            if(flagClassStore)
                                                            {
                                                            %>
                                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                                <% } %>
                                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                            <td align="center" class="fresh"><%= mark.getProcessType()%></td>
                                                            <%
                                                            }
                                                     }
                                            }

                                            StepProperty fg = (StepProperty)m.next();
                                            String fgStatus = fg.getStatus();

                                            if( ( fgStatus != null ) && ( !fgStatus.trim().equalsIgnoreCase("Incomplete") ) && ( !fgStatus.trim().equalsIgnoreCase("Inprocess") ) )
                                            {
                                                //request.setAttribute(fgStep.getProcessType(), fgStep.getProcessStepID());
                                            %>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td align="center" class="current"><a href="<%=chipTracContext%>/finishedGoods.do?processStepID=<%= fg.getProcessStepID()%>&trackID=<%= fg.getTrackID()%>&previousStepName=<%= fg.getPreviousStepName()%>">
                                                <%= fg.getProductName()%></a></td>
                                            <%
                                            }
                                            else
                                            {
                                                if( ( fgStatus != null ) && ( fgStatus.trim().equalsIgnoreCase("Inprocess") ) )
                                                {
                                                %>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td align="center" class="inprocess"><a href="<%=chipTracContext%>/finishedGoods.do?processStepID=<%= fg.getProcessStepID()%>&trackID=<%= fg.getTrackID()%>&previousStepName=<%= fg.getPreviousStepName()%>">
                                                <%= fg.getProductName()%></a></td>
                                                <%
                                                }else {

                                                    if((fg.getPreviousStepID() != null)
                                                            && ( !fg.getPreviousStepID().trim().equals("0"))
                                                            && ( fg.getPreviousStepStatus() != null )
                                                            && ( !fg.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) )
                                                    {
                                                    //request.setAttribute("trackID", fg.getTrackID()+"");
                                                    //request.setAttribute(fg.getProcessType()+"previousStepID", fg.getPreviousStepID());
                                                    %>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <td align="center" class="previous"><a href="<%=chipTracContext%>/finishedGoods.do?stepName=<%= fg.getProcessType()%>&trackID=<%=fg.getTrackID() %>&previousStepID=<%= fg.getPreviousStepID()%>&processStepID=-1&productName=<%= fg.getProductName()%>&baseProductID=<%= productId %>&previousStepName=<%= fg.getPreviousStepName()%>">
                                                        <%= fg.getProductName()%></a></td>
                                                    <%
                                                    } else {
                                                    %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="fresh"><%= fg.getProcessType()%></td>
                                                    <%
                                                    }
                                                }
                                            }
                                    } //while
                               }  else {
                               %>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <%
                               }
                               count++;
                          } else {
                             //count if

                             if(count <testCount)
                             {
                                %>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <% }
                             }
                        } //if
                } //first boolean loop
                first = false;
                %>
                </tr>
                <%
            }//test_list while loop
			
            if(testCount < fgListCount)
            {
                if(fgList != null)
                {
                    for(;;)
                    {
                        for(int x=0; x<(2*(temp+2)-1); x++)
                        {
                        %>
                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                        <%
                        }
                        if(count<fgList.length)
                        {
                            if(!fgList[count].isEmpty())
                            {
                                Iterator m = fgList[count].iterator();
                                while(m.hasNext())
                                {
                                    StepProperty mark = (StepProperty)m.next();
                                    String markStatus = mark.getStatus();

                                    if( ( markStatus != null ) && ( !markStatus.trim().equalsIgnoreCase("Incomplete") ) && ( !markStatus.trim().equalsIgnoreCase("Inprocess")  ) )
                                    {

                                        //request.setAttribute(mark.getProcessType(), mark.getProcessStepID());
                                         if(flagClassStore){
                                         %>
                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                            <%}%>
                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                            <td align="center" class="current"><a href="<%=chipTracContext%>/markAndPack.do?processStepID=<%= mark.getProcessStepID()%>&trackID=<%= mark.getTrackID()%>&previousStepName=<%= mark.getPreviousStepName()%>">
                                            <%= mark.getProductName()%></a></td>

                                         <% } else {

                                            if( ( markStatus != null ) && ( markStatus.trim().equalsIgnoreCase("Inprocess")  ) ){
                                               if(flagClassStore){
                                                %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <%}%>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td align="center" class="inprocess"><a href="<%=chipTracContext%>/markAndPack.do?processStepID=<%= mark.getProcessStepID()%>&trackID=<%= mark.getTrackID()%>&previousStepName=<%= mark.getPreviousStepName()%>">
                                                <%= mark.getProductName()%></a></td>
                                            <%
                                            } else {

                                                if((mark.getPreviousStepID().trim() != null)
                                                        && ( !mark.getPreviousStepID().trim().equals("0"))
                                                        && ( mark.getPreviousStepStatus() != null )
                                                        && ( !mark.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess"))
                                                 )
                                                {
                                                    //request.setAttribute("trackID", mark.getTrackID()+"");
                                                    //request.setAttribute(mark.getProcessType()+"previousStepID", mark.getPreviousStepID());
                                                    if(flagClassStore)
                                                    {
                                                    %>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <%}%>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="previous"><a href="<%=chipTracContext%>/markAndPack.do?stepName=<%= mark.getProcessType()%>&trackID=<%=mark.getTrackID() %>&previousStepID=<%= mark.getPreviousStepID()%>&processStepID=-1&productName=<%= mark.getProductName()%>&baseProductID=<%= productId %>&previousStepName=<%= mark.getPreviousStepName()%>">
                                                    <%= mark.getProductName()%></a></td>
                                                    <%
                                                    } else {
                                                    if(flagClassStore)
                                                    {
                                                    %>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                        <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <%}%>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="fresh"><%= mark.getProcessType()%></td>
                                                    <%
                                                   }
                                              }
                                        }

                                        StepProperty fg = (StepProperty)m.next();
                                        String fgStatus = fg.getStatus();

                                        if((fgStatus != null) && (!fgStatus.trim().equalsIgnoreCase("Incomplete") ) && ( !fgStatus.trim().equalsIgnoreCase("Inprocess") )  )
                                        {
                                                //request.setAttribute(fgStep.getProcessType(), fgStep.getProcessStepID());
                                        %>
                                            <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                            <td align="center" class="current"><a href="<%=chipTracContext%>/finishedGoods.do?processStepID=<%= fg.getProcessStepID()%>&trackID=<%= fg.getTrackID()%>&previousStepName=<%= fg.getPreviousStepName()%>">
                                            <%= fg.getProductName()%></a></td>
                                        <%
                                        } else {
                                            if((fgStatus != null) && ( fgStatus.trim().equalsIgnoreCase("Inprocess") )  )
                                            {
                                            %>
                                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                <td align="inprocess" class="inprocess"><a href="<%=chipTracContext%>/finishedGoods.do?processStepID=<%= fg.getProcessStepID()%>&trackID=<%= fg.getTrackID()%>&previousStepName=<%= fg.getPreviousStepName()%>">
                                                <%= fg.getProductName()%></a></td>
                                            <%
                                            } else {
                                                if( (fg.getPreviousStepID() != null )
                                                        && ( !fg.getPreviousStepID().trim().equals("0"))
                                                        && ( fg.getPreviousStepStatus() != null)
                                                        && ( !fg.getPreviousStepStatus().trim().equalsIgnoreCase("Inprocess") ) )
                                                {
                                                //request.setAttribute("trackID", fg.getTrackID()+"");
                                                //request.setAttribute(fg.getProcessType()+"previousStepID", fg.getPreviousStepID());
                                                %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                                    <td align="center" class="previous"><a href="<%=chipTracContext%>/finishedGoods.do?stepName=<%= fg.getProcessType()%>&trackID=<%=fg.getTrackID() %>&previousStepID=<%= fg.getPreviousStepID()%>&processStepID=-1&productName=<%= fg.getProductName()%>&baseProductID=<%= productId %>&previousStepName=<%= fg.getPreviousStepName()%>">
                                                    <%= fg.getProductName()%></a></td>
                                                <%
                                                } else {
                                                %>
                                                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td><td align="center" class="fresh"><%= fg.getProcessType()%></td>
                                                <%
                                                }
                                            }
                                        }

                                    } //while
                                }
                                else
                                {
                                %>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <%
                                }
                                count++;
                            %></tr><%
                            }
                            else
                            { //count if
                                if(count <testCount)
                                {
                                %>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                                <%
                                }
                                break;
                            }
                        }
                    }
                }
                %>
                <tr>
                <%
                for(int x=0; x<(2*(temp+4)-1); x++)
                {
                %>
                    <td bgcolor="#ffffff">&nbsp;&nbsp;&nbsp;</td>
                <%
                }
                %>
                </tr>
                <%
                } //assembly list length
                %>
                </tr></table>
                <p>&nbsp; </p><p>&nbsp; </p>
            <%
            } //fab list length
            list = null;
            request.removeAttribute("process");
            %>

    <!-- till here -->
    <table height=8 align="center">
    <tr>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td class="previous" width=15 ></td><td class="fresh">Need to configure</td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td class="inprocess" width=15 ></td><td class="fresh">Configuration Inprocess</td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
        <td class="current" width=15> </td> <td></td><td class="fresh">Configuration finished</td>
    </tr>
    </table>

    <BR><BR><BR>
    </TD>
    <TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
    </TR>
    </TABLE>

    <!-- Footer starts here -->
    <%@include file="/jsp/includes/footer.jsp" %>
    <!-- footer end here -->

</BODY>
</HTML>